home *** CD-ROM | disk | FTP | other *** search
/ InterCD 2000 February / february_2000.iso / site building / GoLive 4.0 Tryout / data1.cab / Apps / Modules / JScripts / Actions / Specials / KeyCompare.action < prev    next >
Encoding:
Text File  |  1999-08-05  |  2.9 KB  |  80 lines

  1. <html>
  2.  
  3.     <head>
  4.         <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
  5.         <meta name="generator" content="Adobe GoLive 4">
  6.         <title>KeyCompare Action</title>
  7.     </head>
  8.  
  9.     <body bgcolor="white">
  10.         <center>
  11.             <font size="6">KeyCompare Action</font><font>
  12.             <hr>
  13.             </font></center>
  14.         <p>
  15.         <csactionclass name="KeyPress" function="CSKeyCompare" nsversion="4" ieversion="4" actiontype="3"></p>
  16.         <p>
  17.         <csactionparam name="charCode" type="GLActionNumParam"></p>
  18.         <p></csactionclass>
  19.          </p>
  20.         <p> </p>
  21.         <p>IE Stuff
  22.         <script language="JavaScript1.2" src="../../GlobalScripts/IE.scpt" cyberversion="N1.2"></script>
  23.         </p>
  24.         <p>KeyPress
  25.         <script language="JavaScript1.2" cyberversion="N1.2"><!--
  26. CSCurrentPressedKey = -1;
  27. function CSKeyPress(ev) {
  28.     var code;
  29.     if(IsIE()) CSCurrentPressedKey = event.keyCode;
  30.     else CSCurrentPressedKey = ev.which;
  31. }
  32. document.onkeypress    = CSKeyPress;
  33.  
  34. function CSKeyCompare(condition)
  35. {
  36.     var eq = (condition[1] == CSCurrentPressedKey);
  37.     if(eq)
  38.         CSCurrentPressedKey = -1;
  39.     return eq;
  40. }
  41. // -->
  42.         </script>
  43.          </p>
  44.         <p> </p>
  45.         <p>
  46.         <table cool width="253" height="153" border="0" cellpadding="0" cellspacing="0" gridx="16" showgridx gridy="16" showgridy bgcolor="#eeeeee">
  47.             <tr height="1" cntrlrow>
  48.                 <td width="1" height="1"><spacer type="block" width="1" height="1"></td>
  49.                 <td width="16" height="1"><spacer type="block" width="16" height="1"></td>
  50.                 <td width="58" height="1"><spacer type="block" width="58" height="1"></td>
  51.                 <td width="176" height="1"><spacer type="block" width="176" height="1"></td>
  52.             </tr>
  53.             <tr height="16">
  54.                 <td width="1" height="16"><spacer type="block" width="1" height="16"></td>
  55.                 <td width="16" height="16"><spacer type="block" width="16" height="16"></td>
  56.                 <td width="58" height="16"><spacer type="block" width="58" height="16"></td>
  57.                 <td width="176" height="16"><spacer type="block" width="176" height="16"></td>
  58.             </tr>
  59.             <tr height="3">
  60.                 <td width="1" height="3"><spacer type="block" width="1" height="3"></td>
  61.                 <td width="16" height="3"><spacer type="block" width="16" height="3"></td>
  62.                 <td width="58" height="3"><spacer type="block" width="58" height="3"></td>
  63.                 <td width="176" height="134" colspan="1" rowspan="2" valign="top" align="left" xpos="74">
  64.                     <csactioncntrl name="charCode" x="74" y="16" width="71" height="18" alignx="scale" aligny="top">
  65.                 </td>
  66.             </tr>
  67.             <tr height="131">
  68.                 <td width="1" height="131"><spacer type="block" width="1" height="131"></td>
  69.                 <td width="16" height="131"><spacer type="block" width="16" height="131"></td>
  70.                 <td width="58" height="131" colspan="1" rowspan="1" valign="top" align="left" xpos="16">
  71.                     <csactioncntrl type="StaticText" value="CharCode" x="16" y="19" width="55" height="15" alignx="left" aligny="top">
  72.                 </td>
  73.             </tr>
  74.         </table>
  75.         </p>
  76.         <p> 
  77.     </body>
  78.  
  79. </html>
  80.